class Robot3 extends Thread {

	public Robot3(String isim) {
		super(isim);
	}

	public void run() {
		String isim = this.getName();
		for (int i = 0; i < 5; i++) {

			try {
				if ((isim.equals("Robot1") && (i == 3))) {
					System.out.println(isim + "-> uyutuluyor");
					Thread.sleep(3000);
				} else if ((isim.equals("Robot2") && (i == 2))) {
					System.out.println(isim + "-> uyutuluyor");
					Thread.sleep(5000);
				} else if ((isim.equals("Robot3") && (i == 4))) {
					System.out.println(isim + "-> uyutuluyor");
					Thread.sleep(7500);
				}
			} catch (InterruptedException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}

			System.out.println(isim + "-->" + i);
		}
	}
}

public class UyurGezer {
	public static void main(String args[]) {

		Robot3 r1 = new Robot3("Robot1");
		Robot3 r2 = new Robot3("Robot2");
		Robot3 r3 = new Robot3("Robot3");

		r1.start(); // dikkat
		r2.start(); // dikkat
		r3.start(); // dikkat
	}
}
